package com.liuyi.usercenterservice.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.liuyi.usercenterservice.common.BaseResponse;
import com.liuyi.usercenterservice.entity.domain.Team;
import com.liuyi.usercenterservice.entity.domain.User;
import com.liuyi.usercenterservice.entity.request.TeamJoinRequest;
import com.liuyi.usercenterservice.entity.request.TeamQueryRequest;
import com.liuyi.usercenterservice.entity.request.TeamQuitRequest;
import com.liuyi.usercenterservice.entity.request.TeamUpdateRequest;
import com.liuyi.usercenterservice.entity.vo.TeamVO;

import java.util.List;

/**
* @author admin
* @description 针对表【team(队伍)】的数据库操作Service
* @createDate 2024-07-01 21:08:36
*/
public interface TeamService extends IService<Team> {
    /**
     *  创建队伍
     * @param team
     * @param loginUser
     * @return
     */
    Long addTeam(Team team, User loginUser);

    /**
     * 根据查询条件查询队伍
     * @param queryRequest
     * @param isAdmin
     * @return
     */
    List<TeamVO> listTeam(TeamQueryRequest queryRequest, boolean isAdmin);

    /**
     * 修改队伍信息
     * @param teamRequest
     * @param loginUser
     * @return
     */
    boolean updateTeam(TeamUpdateRequest teamRequest, User loginUser);

    /**
     * 加入队伍
     * @param joinRequest
     * @param loginUser
     * @return
     */
    Boolean joinTeam(TeamJoinRequest joinRequest, User loginUser);

    /**
     * 退出队伍
     * @param quitRequest
     * @param loginUser
     * @return
     */
    Boolean quitTeam(TeamQuitRequest quitRequest, User loginUser);

    /**
     * 解散队伍
     * @param id
     * @param loginUser
     * @return
     */
    boolean removeByTeamId(Long id,User loginUser );

    /**
     * 用户加入的队伍
     * @param loginUser
     * @return
     */
    List<TeamVO> listMyTeam(User loginUser);
}
